/**
 * 项目示例-列表表头
 * Date 2023-5-25 09:33:56
 * 可选参数可参考：https://element-plus.org/zh-CN/component/table.html#table-column-属性
 */

import type { TableColumnCtx } from 'element-plus'
interface AskListItem {
  askTimeStart?: string[];
  askTimeEnd?: string[];
  askType?: string;
  askContent?: string;
  askTime?: string;
  recorder?: string;
  askRegion?: string;
  recordTime?:string;
  syncTime?:string;
}

export const askColumns = [
  { type: 'index', label: '序号', width: 60, align: 'center' },
  { prop: 'askType', label: '问询类型', minWidth: 130, align: 'center',
  formatter (row: any, column: any, cellValue: string) {
  // @ts-ignore
    if (cellValue && cellValue.trim() != '') {
    // @ts-ignore
      return cellValue
    } else {
      return '-'
    }
  } },
  { prop: 'askContent', label: '问询内容', minWidth: 200, align: 'center',
  formatter (row: any, column: any, cellValue: string) {
  // @ts-ignore
    if (cellValue && cellValue.trim() != '') {
    // @ts-ignore
      return cellValue
    } else {
      return '-'
    }
  } },
  { prop: 'askTime', label: '问询时间', minWidth: 120, sortable: 'custom', align: 'center',
  formatter (row: any, column: any, cellValue: string) {
  // @ts-ignore
    if (cellValue && cellValue.trim() != '') {
    // @ts-ignore
      return cellValue
    } else {
      return '-'
    }
  } },
  { prop: 'recordTime', label: '记录时间', minWidth: 120, sortable: 'custom', align: 'center',
  formatter (row: any, column: any, cellValue: string) {
  // @ts-ignore
    if (cellValue && cellValue.trim() != '') {
    // @ts-ignore
      return cellValue
    }
  } },
  // custom
  {
    prop: 'recorder',
    label: '记录人',
    align: 'center',
    formatter (row: any, column: any, cellValue: string) {
      // @ts-ignore
        if (cellValue && cellValue.trim() != '') {
        // @ts-ignore
          return cellValue
        } else {
          return '-'
        }
      }
  },
  { prop: 'syncTime', label: '同步时间', sortable: 'custom', minWidth: 180, align: 'center',
  formatter (row: any, column: any, cellValue: string) {
    // @ts-ignore
      if (cellValue && cellValue.trim() != '') {
      // @ts-ignore
        return cellValue
      } else {
        return '-'
      }
    }}
]
